package com.training.oo.date;

import java.time.LocalDate;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Date;

public class LocalDateDemo {
	public static void main(String[] args) {
//		LocalDate date = LocalDate.now();
//		
//		System.out.println(date);
//		
//		System.out.println(date.getYear());
//		System.out.println(date.getMonth());
//		System.out.println(date.getDayOfMonth());
//		
//		System.out.println(date.isLeapYear());
//		
//		date = date.plusDays(20);
//		System.out.println(date);
		
//		Date d = new Date();
//		
//		LocalDate local = d.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
//		
//		System.out.println(local);
		
		ZonedDateTime zdt = LocalDate.now().atStartOfDay(ZoneId.systemDefault());
		Date d = Date.from(zdt.toInstant());
		System.out.println(d);
		
	}
}
